{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "bb715182",
   "metadata": {},
   "source": [
    "------------------------------------------------------------------------------------\n",
    "* 2022-08-30\n",
    "* python学习第二周\n",
    "_______________________________________________________________________________________"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "61b0c4eb",
   "metadata": {},
   "source": [
    "# 本周学习内容"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "bfc30246",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Not an odd minute.\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "\n",
    "odds = [ 1, 3, 5, 7, 9, 11,13,15,17,19,\n",
    "            21,23,25,27,29,31,33,35,37,39,\n",
    "            41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "right_this_minute = datetime.today().minute\n",
    "    \n",
    "if right_this_minute in odds:\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5bc2dcbf",
   "metadata": {},
   "source": [
    "## 2.1模块--标准库\n",
    "\n",
    "* 标准库是python开发团队为满足python用户日常需求而写好的一些模块，可以直接使用：import模块名称\n",
    "\n",
    ">1. sys模块\n",
    ">2. os模块\n",
    ">3. datetime模块\n",
    "\n",
    "## 2.2模块--开源模块（pypi.org）\n",
    "## 2.3自定义模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "0c86da0d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "28b60183",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]'"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sys.version"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "985531e3",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "8f998014",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'D:\\\\2022-2023\\\\python\\\\week02'"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "28011b49",
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "066abb27",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(2022, 8, 30)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2ccb860e",
   "metadata": {},
   "source": [
    "### 认识下 time模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "8669af39",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "deff0a19",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=8, tm_mday=30, tm_hour=14, tm_min=39, tm_sec=2, tm_wday=1, tm_yday=242, tm_isdst=0)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.localtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "d17d6c32",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1661844617.2237527"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.time()#时间戳"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "642fad6e",
   "metadata": {},
   "source": [
    "## 3.赋值\n",
    "\n",
    "## 4.变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9b84d863",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
